/*
 * 
 * Libman
 * 
 * Daniel Kaufmann, Martin Lang, Simon Moosbrugger,
 * Stefan Mayer, Stephan Halbeisen
 * 
 */
package application.server;

import java.rmi.RemoteException;
import java.rmi.server.RemoteServer;
import java.rmi.server.ServerNotActiveException;
import java.util.List;

import middleware.datacontainer.groupPropertiesChange.GroupPropertiesContainer;
import application.controller.server.UseCaseControllerGroupPropertiesChange;
import application.exceptions.DatabaseException;
import application.exceptions.InsufficientClientRightsException;
import application.exceptions.SessionException;

/**
 * The Class MediumSearchRemoteImpl.
 */
public class GroupPropertiesChangeRemoteImpl extends AbstractRemoteImpl
		implements GroupPropertiesChangeRemote {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1534520043005272256L;

	/** The _controller. */
	UseCaseControllerGroupPropertiesChange _controller;

	/**
	 * Instantiates a new medium search remote impl.
	 * 
	 * @throws RemoteException
	 *             the remote exception
	 */
	public GroupPropertiesChangeRemoteImpl() throws RemoteException {
		super();
		_controller = new UseCaseControllerGroupPropertiesChange();
	}

	@Override
	public List<GroupPropertiesContainer> getGroupProperties(String sessionId)
			throws SessionException, InsufficientClientRightsException,
			ServerNotActiveException {
		return _controller.getGroupProperties(sessionId,
				"");
	}

	@Override
	public void saveGroupProperties(String sessionId,
			List<GroupPropertiesContainer> groupProperties)
			throws SessionException, InsufficientClientRightsException,
			DatabaseException, ServerNotActiveException {
		_controller.saveGroupProperties(sessionId, RemoteServer.getClientHost(), groupProperties);
	}
}
